/**
 * Created by hsiacool on 2017/8/25.
 */

var path1 = window.location.href.split('?')[1];
var url1;
if(path1){
    url1 = path1.substr(-1,path1.length);
}else{
    url1=0;
}
if(url1==0){
    $('.pref').removeClass("prefpage");
}
$(".nowpage").text(Number(url1)+Number(1));

$(".prefpage").click(function(){
    var prefpage = $(".prefpage").val();
    prefpage = url1-1;
    window.location.href="?id="+urlid+"&pageIndex="+prefpage;
});
$(".nextpage").click(function(){
    var nextpage = $(".nextpage").val();
    nextpage = Number(url1) + Number(1);
    window.location.href="?id="+urlid+"&pageIndex="+nextpage;
});
